package com.stu.JdbcTx;

import org.springframework.jdbc.core.support.JdbcDaoSupport;

public class AccountDaoImpl extends JdbcDaoSupport implements AccountDao {

	@Override
	public void out(String outer, Integer money) {
		String sql="update sut set balance=balance-? where name=?";
		this.getJdbcTemplate().update(sql,money,outer);
	}

	@Override
	public void in(String inner, Integer money) {
		String sql="update sut set balance=balance+? where name=?";
		this.getJdbcTemplate().update(sql,money,inner);
	}

}
